package com.chiyi.service;

import com.chiyi.bean.TProduct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @date 2021/5/13 21:29
 * 指定调用服务器的名称，指定容错类
 */
@FeignClient(value = "service-product", fallback = ProductClientFallBack.class)
public interface ProductClient {


    @GetMapping("/work")
    String work();

    @GetMapping("/getAllProduct")
    List<TProduct> getAllProduct();

    @GetMapping("/product/detail/{id}")
    TProduct detail(@PathVariable Integer id);
}
